package bitwiseOperation;

//https://leetcode.cn/problems/minimum-bit-flips-to-convert-number/description/
public class l_2220 {
    public int minBitFlips(int start, int goal) {
        int ans = 0, num = start ^ goal;
        while(num != 0)
        {
            num = num & (num - 1);
            ans++;
        }
        return ans;
    }
}
